<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('config_tables', function (Blueprint $table) {
            $table->id();
            $table->string('key')->default('')->comment('键名');
            $table->text('value')->nullable()->comment('键值');
            $table->tinyInteger('status')->default(1)->comment('1启用2禁用');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `config_tables` comment '基础设置表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('config_tables');
    }
};
